<?php

/**
 * 
 */
class WidgetInstance extends CActiveRecord {
		
	public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }
	
	public function tableName()
	{
		return '{{widgetinstance}}';
	}
	
	public function relations()
    {
        return array(
            'widgetType'=>array(self::BELONGS_TO, 'WidgetType', 'type_id'),
        );
    }
	
	/**
	 * @return String
	 */
	public function getClass(){
		return $this->widgetType->class;
	}
	
}
